package com.zood.controller;

import com.zood.controller.utils.R;
import com.zood.domain.show;
import com.zood.service.showService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/show")
public class showController {
    @Autowired
    private showService activityService;

//    @GetMapping("{id}")
//    public R getById(@PathVariable Integer id){
//        return new R(true, activityService.getALLbyID(id));
//    }

    @GetMapping("{mid}/{tid}")
    public R getById1(@PathVariable Integer mid, @PathVariable int tid){
        Integer all = activityService.getCount();
        return new R(true, activityService.getALLbyID1(mid,tid),all);
    }
}
